<template>
    <div class="box">
        <van-cell style="padding: 20px 16px;">企业业务员认证</van-cell>
        <van-divider style="margin: 7px 0;" />
        <van-row class="row">
            <van-col span="11">
                <div class="mingz">组织证照</div>
                <div class="shangc">
                    <van-uploader :after-read="afterRead" :max-size="500 * 1024" multiple @oversize="onOversize">
                        <van-button icon="plus" style="height:80px;width:105px;"></van-button>
                    </van-uploader>
                </div>
            </van-col>

            <van-col span="2">
                <el-divider direction="vertical"></el-divider>
            </van-col>
            <van-col class="colee" span="11">
                <img v-if="imageUrl" :src="imageUrl" class="avatar" ref="imgsa" @click="acs">
                <a class="aher" @click="cktp">点击查看</a>
            </van-col>
            <span class="tsxx">可接受格式为：jpg、jpeg、png、gif、图片大小不能超过500k；可以添加水印，但不能遮挡关键信息，例如公司名称、公司证件号。</span>
        </van-row>
        <van-row class="biaodanm">
            <van-form @submit="onSubmit">
                <van-field readonly clickable name="picker" :value="value" label="申报口岸" placeholder="请选择"
                    @click="showPicker = true" />
                <van-popup v-model="showPicker" position="bottom">
                    <van-picker show-toolbar :columns="columns" @confirm="onConfirm" @cancel="showPicker = false">
                        <template #option="option">
                            <div style="display: flex; flex-direction: column; align-items: center;">
                                <div>{{ option.name }}</div>
                            </div>
                        </template>
                    </van-picker>
                </van-popup>
                <van-field v-model="qymc" name="企业名称" label="企业名称" placeholder="请输入企业名称全称"
                    :rules="[{ required: true, message: '请输入企业名称全称' }]" />



                <van-field readonly clickable name="picker" :value="valuea" label="企业类型" placeholder="请选择"
                    @click="showPickera = true" />
                <van-popup v-model="showPickera" position="bottom">
                    <van-picker show-toolbar :columns="columnsa" @confirm="onConfirma" @cancel="showPickera = false">
                        <template #option="option">
                            <div style="display: flex; flex-direction: column; align-items: center;">
                                <div>{{ option.name }}</div>
                            </div>
                        </template>
                    </van-picker>
                </van-popup>


                <van-field v-model="jgdm" name="机构代码" label="机构代码" placeholder="请输入企业机构代码"
                    :rules="[{ required: true, message: '请输入企业机构代码' }]" />
                <!-- <div style="margin: 16px;">
                    <van-button round block type="info" native-type="submit">提交</van-button>
                </div> -->
            </van-form>
        </van-row>
        <van-row class="row">
            <van-col span="11">
                <div class="mingz">身份证（正面）</div>
                <div class="shangc">
                    <van-uploader :after-read="afterRead2" :max-size="500 * 1024" multiple @oversize="onOversize">
                        <van-button icon="plus" style="height:80px;width:105px;"></van-button>
                    </van-uploader>
                </div>
            </van-col>

            <van-col span="2">
                <el-divider direction="vertical"></el-divider>
            </van-col>
            <van-col class="colee" span="11">
                <img v-if="imageUrl2" :src="imageUrl2" class="avatar" ref="imgsa2" @click="acs">
                <a class="aher" @click="cktp2">点击查看</a>
            </van-col>
            <span class="tsxx">可接受格式为：jpg、jpeg、png、gif、图片大小不能超过500k；可以添加水印，但不能遮挡关键信息，例如名字、身份证号。</span>
        </van-row>
        <van-row class="row">
            <van-col span="11">
                <div class="mingz">身份证（反面）</div>
                <div class="shangc">
                    <van-uploader :after-read="afterRead3" :max-size="500 * 1024" multiple @oversize="onOversize">
                        <van-button icon="plus" style="height:80px;width:105px;"></van-button>
                    </van-uploader>
                </div>
            </van-col>

            <van-col span="2">
                <el-divider direction="vertical"></el-divider>
            </van-col>
            <van-col class="colee" span="11">
                <img v-if="imageUrl3" :src="imageUrl3" class="avatar" ref="imgsa3" @click="acs">
                <a class="aher" @click="cktp3">点击查看</a>
            </van-col>
            <span class="tsxx">可接受格式为：jpg、jpeg、png、gif、图片大小不能超过500k；可以添加水印，但不能遮挡关键信息。</span>
        </van-row>
        <van-row class="biaodanm">
            <van-field v-model="xzsxm" readonly name="姓名" label="姓名" placeholder="请输入名字"
                :rules="[{ required: true, message: '请输入名字' }]" />
            <van-field name="radio" label="性别">
                <template #input>
                    <van-radio-group v-model="radio" disabled direction="horizontal">
                        <van-radio name="1">男</van-radio>
                        <van-radio name="2">女</van-radio>
                    </van-radio-group>
                </template>
            </van-field>
            <van-field v-model="xzssfz" readonly name="身份证号码" label="身份证号码" placeholder="请输入身份证号码"
                :rules="[{ required: true, message: '请输入身份证号码' }]" />
            <van-field v-model="ssbm" name="所属部门" label="所属部门" placeholder="请输入所属部门"
                :rules="[{ required: true, message: '请输入所属部门' }]" />
            <van-field v-model="zw" name="职务" label="职务" placeholder="请输入职务"
                :rules="[{ required: true, message: '请输入职务' }]" />
            <van-field readonly v-model="xzssjh" name="联系电话" label="联系电话" placeholder="请输入联系电话"
                :rules="[{ required: true, message: '请输入联系电话' }]" />
        </van-row>
        <van-row class="row" style="height: 177px;">
            <div class="mingz">单位人员备案表<span style="color:red;">(新备案人员须上传)</span></div>
            <van-col span="11">

                <div class="shangc" style="line-height: 140px;">
                    <van-uploader :after-read="afterRead4" :max-size="500 * 1024" multiple @oversize="onOversize">
                        <van-button icon="plus" style="height:80px;width:105px;"></van-button>
                    </van-uploader>
                </div>
            </van-col>

            <van-col span="2">
                <el-divider direction="vertical"></el-divider>
            </van-col>
            <van-col class="colee" span="11">
                <img v-if="imageUrl4" :src="imageUrl4" class="avatar" ref="imgsa4" @click="acs">
                <a class="aher" @click="cktp4">点击查看</a>
            </van-col>
            <span class="tsxx">可接受格式为：jpg、jpeg、png、gif、图片大小不能超过500k；可以添加水印，但不能遮挡关键信息。</span>
        </van-row>
        <van-row class="anniu" type="flex" justify="center">
            <van-col span="12">
                <van-button type="default" @click="fanhui" block>返回</van-button>
            </van-col>
            <van-col span="12">
                <van-button type="info" block @click="ywytj">提交</van-button>
            </van-col>
        </van-row>
        <van-dialog v-model="show" title="备案" show-cancel-button @close="close" @confirm="confirm">
            <span style="display: flex;align-items: center;justify-content: center;">确认人员已备案并提交</span>
        </van-dialog>
    </div>
</template>

<script>
    import screenfull from 'screenfull';
    export default {
        data() {
            return {
                show: false,
                showPickera: false,
                fileList: [],
                // imageUrl: require('@/assets/image/aaa (1).png'),
                imageUrl: [require('@/assets/image/zz.jpg'), ],
                imageUrl2: require('@/assets/image/zm.jpg'),
                imageUrl3: require('@/assets/image/fm.jpg'),
                imageUrl4: require('@/assets/image/dwrybab.jpg'),
                value: '',
                columns: [],
                showPicker: false,
                username: '',
                password: '',
                radio: '',
                // 组织证照
                zzzz: "",
                qymc: "",
                jgdm: "",
                sfza: "",
                sfzb: "",
                xm: "",
                sfz: "",
                ssbm: "",
                zw: "",
                dh: "",
                // sqs: "",
                xb: "女",
                xzsxm: "",
                xzssfz: "",
                xzssjh: "",
                kaida: "",
                columnsa: [],
                valuea: '',
                kaid: "",
            };
        },
        created() {
            var that = this
            that.kouanxx()
            that.qylx()
        },
        mounted() {
            var that = this
            var mx = window.sessionStorage.getItem("mz")
            var sjh = window.sessionStorage.getItem("sjh")
            var sfz = window.sessionStorage.getItem("sfz")
            var xb = window.sessionStorage.getItem("xb")
            that.xm = mx
            that.sfz = sfz
            that.dh = sjh
            that.radio = xb
            if (xb == 1) {
                that.xb = "男"
            }
            if (xb == 2) {
                that.xb = "女"
            }
            that.name = mx
            that.sfz = sfz
            that.lxdh = sjh
            that.radio = xb
            // 须展示
            that.xzsxm = mx
            that.xzssjh = sjh
            that.xzssfz = sfz
            if (that.xzsxm.length == '2') {
                that.xzsxm = '*' + that.xzsxm.charAt(that.xzsxm.length - 1)
            }
            if (that.xzsxm.length == '3') {
                that.xzsxm = '**' + that.xzsxm.charAt(that.xzsxm.length - 1)
            }
            if (that.xzsxm.length == '4') {
                that.xzsxm = '***' + that.xzsxm.charAt(that.xzsxm.length - 1)
            }
            if (that.xzsxm.length == '5') {
                that.xzsxm = '****' + that.xzsxm.charAt(that.xzsxm.length - 1)
            }
            that.xzssjh = that.xzssjh.substr(0, 3) + '******' + that.xzssjh.substr(9, 2)
            // 15位身份证号
            if (that.xzssfz.length == '15') {
                that.xzssfz = that.xzssfz.substr(0, 1) + '*************' + that.xzssfz.substr(14, 1)
            }
            // 18位身份证号
            if (that.xzssfz.length == '18') {
                that.xzssfz = that.xzssfz.substr(0, 1) + '****************' + that.xzssfz.substr(17, 1)
            }


        },
        methods: {
            confirm() {
                var that = this
                that.$toast.loading({
                    message: '上传中...',
                    forbidClick: true,
                    duration: 50000,
                });
                var jmqsjtj = JSON.stringify({
                    //入参内容
                    "bm": "",
                    "code": that.jgdm,
                    "createBy": "",
                    "createTime": "",
                    "id": "",
                    "lxdh": that.dh,
                    "name": "",
                    "phone": "",
                    "pid": "",
                    "qymc": that.qymc,
                    "sbka": that.kaid,
                    "busType": that.kaida,
                    "sfz": that.sfz,
                    "sfza": that.sfza,
                    "sfzb": that.sfzb,
                    "sh": "",
                    "shxx": "",
                    "sqs": that.sqs,
                    "sysOrgCode": that.ssbm,
                    "updateBy": "",
                    "updateTime": "",
                    "xb": that.radio,
                    "xm": that.xm,
                    "zw": that.zw,
                    "zzzz": that.zzzz,
                })
                var jmhsjtj = SM.encrypt(jmqsjtj,
                    //公钥
                    "048b7acbb9884686aa9317a6ca3059f6c2eb4e2686c6eb1e70d598f48af8748075f1aef521cf837d67a95281d4667ade8228fb577eb4256e15a9e807323b2b5efc"
                );
                // var appid = that.appid;
                var appid = "Embmzckm";
                var interfaceid = 'qyywysq';
                var interfacecontent = jmhsjtj
                var fromport = '2';
                var signurl = 'https://' + urldomaincreatesign;
                var gatewayurl = 'https://' + urldomaingateway;
                vaildInterfacefn(appid, interfaceid, interfacecontent, fromport, signurl, gatewayurl).then(value => {
                    console.log(jmqsjtj);
                    console.log(value);
                    //私钥
                    var jjjsjtj = SM.decrypt(value,
                        "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b");
                    var list = JSON.parse(jjjsjtj)
                    console.log(list);
                    console.log("/////////////////////////////////");
                    console.log(that.valuea);
                    if (list.code == 200) {
                        that.$toast('提交成功');
                        that.$router.push('./')
                        that.$toast.clear();
                    } else {
                        that.$toast("上传失败，请重新上传");
                    }
                    if (list.code == 500) {
                        that.$toast.clear();
                        that.$toast(list.message);
                    }
                })
            },
            // 弹框取消
            close() {
                console.log(456);
            },

            onOversize(file) {
                var that = this
                console.log(file);
                that.$toast("图片大小不得大于500k");
            },
            fanhui() {
                var that = this
                that.$router.push('./tjrz')
            },
            // 上传图片
            afterRead4(file) {
                var that = this
                if (that.jgdm == "" || that.jgdm == null || that.jgdm == undefined) {
                    that.$toast("请先上传机构代码");
                    return
                }
                that.$toast.loading({
                    message: '上传中...',
                    forbidClick: true,
                    duration: 50000,
                });
                // // 参数
                console.log("123", file)
                that.imageUrl4 = file.content
                let headers = {
                    "mimeType": "multipart/form-data",
                };
                let requestData = {
                    "code": that.jgdm,
                    "fn": "qyywy_dwrybab",
                    "sfz_": that.sfz
                }
                let ssss = JSON.stringify(requestData)
                var jmhsjtj = SM.encrypt(ssss,
                    "04eecb3f2b950e61a72328c970f0b513f9491ca39a497cc8b43ec41edac1e61a688d784ced844908cee71d315e7662a6f642e0f08a934f660347992500904aaf60"
                );
                let fdDqtq = new FormData()
                fdDqtq.append('app_id', "Embmzckm")
                fdDqtq.append('interface_id', 'ywytpsc')
                fdDqtq.append('version', '1.0')
                fdDqtq.append('biz_content', jmhsjtj)
                fdDqtq.append('header', JSON.stringify(headers))
                fdDqtq.append('file', file.file)
                fdDqtq.append('charset', 'utf-8')
                fdDqtq.append('timestamp', (new Date()).valueOf())
                fdDqtq.append('origin', '2')
                fdDqtq.append('sign', 'signResult')
                $.ajax({
                    url: "https://isdapp.shandong.gov.cn/jpaas-jags-server/interface/gateway",
                    type: 'post',
                    dataType: 'json',
                    data: fdDqtq,
                    contentType: false,
                    processData: false,
                    cache: false,
                    success: function (data) {
                        console.log(data);
                        let response = JSON.parse(SM.decrypt(data.data,
                            "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b"))
                        console.log(response);
                        that.sqs = response.result[0]
                        // window.sessionStorage.setItem("sqs", that.sqs)
                        // console.log("sqs", that.sqs);
                        console.log("爱山东");
                        that.$toast.clear();
                    },
                    error: function (data) {
                        console.log(data);
                        that.$toast("网络不稳定请重新上传");
                    }
                })
            },
            // 上传图片
            afterRead3(file) {
                var that = this
                if (that.jgdm == "" || that.jgdm == null || that.jgdm == undefined) {
                    that.$toast("请先上传机构代码");
                    return
                }
                that.$toast.loading({
                    message: '上传中...',
                    forbidClick: true,
                    duration: 50000,
                });
                // // 参数
                console.log("123", file)
                that.imageUrl3 = file.content
                let headers = {
                    "mimeType": "multipart/form-data",
                };
                let requestData = {
                    "code": that.jgdm,
                    "fn": "qyywy_sfzfm",
                    "sfz_": that.sfz,
                }
                let ssss = JSON.stringify(requestData)
                var jmhsjtj = SM.encrypt(ssss,
                    "04eecb3f2b950e61a72328c970f0b513f9491ca39a497cc8b43ec41edac1e61a688d784ced844908cee71d315e7662a6f642e0f08a934f660347992500904aaf60"
                );
                let fdDqtq = new FormData()
                fdDqtq.append('app_id', "Embmzckm")
                fdDqtq.append('interface_id', 'ywytpsc')
                fdDqtq.append('version', '1.0')
                fdDqtq.append('biz_content', jmhsjtj)
                fdDqtq.append('header', JSON.stringify(headers))
                fdDqtq.append('file', file.file)
                fdDqtq.append('charset', 'utf-8')
                fdDqtq.append('timestamp', (new Date()).valueOf())
                fdDqtq.append('origin', '2')
                fdDqtq.append('sign', 'signResult')
                $.ajax({
                    url: "https://isdapp.shandong.gov.cn/jpaas-jags-server/interface/gateway",
                    type: 'post',
                    dataType: 'json',
                    data: fdDqtq,
                    contentType: false,
                    processData: false,
                    cache: false,
                    success: function (data) {
                        console.log(data);
                        let response = JSON.parse(SM.decrypt(data.data,
                            "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b"))
                        console.log(response);
                        that.sfzb = response.result[0]
                        console.log("爱山东");
                        that.$toast.clear();
                    },
                    error: function (data) {
                        console.log(data);
                        that.$toast("网络不稳定请重新上传");
                    }
                })
            },
            // 上传图片
            afterRead2(file) {
                var that = this
                if (that.jgdm == "" || that.jgdm == null || that.jgdm == undefined) {
                    that.$toast("请先上传机构代码");
                    return
                }
                that.$toast.loading({
                    message: '上传中...',
                    forbidClick: true,
                    duration: 50000,
                });
                // // 参数
                console.log("123", file)
                that.imageUrl2 = file.content
                let headers = {
                    "mimeType": "multipart/form-data",
                };
                let requestData = {
                    "code": that.jgdm,
                    "fn": "qyywy_sfzzm",
                    "sfz_": that.sfz,
                }
                let ssss = JSON.stringify(requestData)
                var jmhsjtj = SM.encrypt(ssss,
                    "04eecb3f2b950e61a72328c970f0b513f9491ca39a497cc8b43ec41edac1e61a688d784ced844908cee71d315e7662a6f642e0f08a934f660347992500904aaf60"
                );
                let fdDqtq = new FormData()
                fdDqtq.append('app_id', "Embmzckm")
                fdDqtq.append('interface_id', 'ywytpsc')
                fdDqtq.append('version', '1.0')
                fdDqtq.append('biz_content', jmhsjtj)
                fdDqtq.append('header', JSON.stringify(headers))
                fdDqtq.append('file', file.file)
                fdDqtq.append('charset', 'utf-8')
                fdDqtq.append('timestamp', (new Date()).valueOf())
                fdDqtq.append('origin', '2')
                fdDqtq.append('sign', 'signResult')
                $.ajax({
                    url: "https://isdapp.shandong.gov.cn/jpaas-jags-server/interface/gateway",
                    type: 'post',
                    dataType: 'json',
                    data: fdDqtq,
                    contentType: false,
                    processData: false,
                    cache: false,
                    success: function (data) {
                        console.log(data);
                        let response = JSON.parse(SM.decrypt(data.data,
                            "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b"))
                        console.log(response);
                        that.sfza = response.result[0]
                        // window.sessionStorage.setItem("sfza", that.sfza)
                        // console.log("sfza", that.sfza);
                        that.$toast.clear();
                        console.log("爱山东");
                    },
                    error: function (data) {
                        console.log(data);
                        that.$toast("网络不稳定请重新上传");
                    }
                })
            },
            // 上传图片
            afterRead(file) {
                var that = this
                if (that.jgdm == "" || that.jgdm == null || that.jgdm == undefined) {
                    that.$toast("请先上传机构代码");
                    return
                }
                that.$toast.loading({
                    message: '上传中...',
                    forbidClick: true,
                    duration: 50000,
                });
                // // 参数
                that.imageUrl = file.content
                console.log(that.imageUrl);
                let headers = {
                    "mimeType": "multipart/form-data",
                };
                let requestData = {
                    "code": that.jgdm,
                    "fn": "qyywy_zzzz",
                    "sfz_": that.sfz,
                }
                let ssss = JSON.stringify(requestData)
                var jmhsjtj = SM.encrypt(ssss,
                    "04eecb3f2b950e61a72328c970f0b513f9491ca39a497cc8b43ec41edac1e61a688d784ced844908cee71d315e7662a6f642e0f08a934f660347992500904aaf60"
                );
                let fdDqtq = new FormData()
                fdDqtq.append('app_id', "Embmzckm")
                fdDqtq.append('interface_id', 'ywytpsc')
                fdDqtq.append('version', '1.0')
                fdDqtq.append('biz_content', jmhsjtj)
                fdDqtq.append('header', JSON.stringify(headers))
                fdDqtq.append('file', file.file)
                fdDqtq.append('charset', 'utf-8')
                fdDqtq.append('timestamp', (new Date()).valueOf())
                fdDqtq.append('origin', '2')
                fdDqtq.append('sign', 'signResult')
                $.ajax({
                    url: "https://isdapp.shandong.gov.cn/jpaas-jags-server/interface/gateway",
                    type: 'post',
                    dataType: 'json',
                    data: fdDqtq,
                    contentType: false,
                    processData: false,
                    cache: false,
                    success: function (data) {
                        console.log(data);
                        let response = JSON.parse(SM.decrypt(data.data,
                            "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b"))
                        console.log(response);
                        that.zzzz = response.result[0]
                        // window.sessionStorage.setItem("zzzz", that.zzzz)
                        // console.log("zzzz", that.zzzz);
                        console.log("爱山东");
                        that.$toast.clear();
                    },
                    error: function (data) {
                        console.log(data);
                        that.$toast("网络不稳定请重新上传");
                    }
                })
            },

            cktp() {
                var that = this
                that.$refs.imgsa.innerHTML
                if (screenfull.isEnabled) {
                    screenfull.toggle(that.$refs.imgsa);
                } else {
                    that.$toast('ios暂不支持放大效果');
                    // that.$refs.imgsa.requestFullscreen()
                }
            },
            cktp2() {
                var that = this
                // that.$refs.imgsa.innerHTML
                if (screenfull.isEnabled) {
                    screenfull.toggle(that.$refs.imgsa2);
                } else {
                    that.$toast('ios暂不支持放大效果');
                }
            },
            cktp3() {
                var that = this
                // that.$refs.imgsa.innerHTML
                if (screenfull.isEnabled) {
                    screenfull.toggle(that.$refs.imgsa3);
                } else {
                    that.$toast('ios暂不支持放大效果');
                }
            },
            cktp4() {
                var that = this
                // that.$refs.imgsa.innerHTML
                if (screenfull.isEnabled) {
                    screenfull.toggle(that.$refs.imgsa4);
                } else {
                    that.$toast('ios暂不支持放大效果');

                }
            },
            acs() {
                console.log(123);
                // screenfull.toggle()
            },
            onConfirm(value) {
                var that = this
                that.value = value.name;
                that.kaid = value.id;
                that.showPicker = false;
            },
            onConfirma(valuea) {
                console.log(valuea);
                var that = this
                that.valuea = valuea.name;
                that.kaida = valuea.id;
                console.log(that.valuea);
                console.log(that.kaida);
                that.showPickera = false;
            },
            onSubmit(values) {
                console.log('submit', values);
            },
            kouanxx() {
                // const axios = require('axios');
                // let data = '';

                // let config = {
                //     method: 'get',
                //     maxBodyLength: Infinity,
                //     url: 'https://161j4l5791.imdo.co/jeecg-boot/api/getport',
                //     headers: {},
                //     data: data
                // };
                // axios.request(config)
                //     .then((response) => {
                //         that.columns = response.data.result
                //     })
                //     .catch((error) => {
                //         console.log(error);
                //     });
                var that = this
                var jmqsjtj = JSON.stringify({
                    //入参内容
                })
                var jmhsjtj = SM.encrypt(jmqsjtj,
                    //公钥
                    "04f82fca5663e92a3830c8bdab96a9383a83610bb793da146ea4dfbb4035690c36bf7816aa00cd57d9df96b35d4286b75d8a7c2210300f4d70899a08ea0357a692"
                );
                // var appid = that.appid;
                var appid = "Embmzckm";
                var interfaceid = 'hqkalb';
                var interfacecontent = jmhsjtj
                var fromport = '2';
                var signurl = 'https://' + urldomaincreatesign;
                var gatewayurl = 'https://' + urldomaingateway;
                vaildInterfacefn(appid, interfaceid, interfacecontent, fromport, signurl, gatewayurl).then(value => {
                    //私钥
                    var jjjsjtj = SM.decrypt(value,
                        "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b");
                    var list = JSON.parse(jjjsjtj)
                    that.columns = list.result
                })

            },
            qylx() {
                var that = this
                var jmqsjtj = JSON.stringify({
                    //入参内容
                })
                var jmhsjtj = SM.encrypt(jmqsjtj,
                    //公钥
                    "04bbc30dfb0971796ddf99ddcf35810b2f9e167ad540182337f4c4ae8f7101ef01e85017a275147d0834154701345b862a810477ab3b111b17a22d4c5380c60750"
                );
                // var appid = that.appid;
                var appid = "Embmzckm";
                var interfaceid = 'qylx';
                var interfacecontent = jmhsjtj
                var fromport = '2';
                var signurl = 'https://' + urldomaincreatesign;
                var gatewayurl = 'https://' + urldomaingateway;
                vaildInterfacefn(appid, interfaceid, interfacecontent, fromport, signurl, gatewayurl).then(value => {
                    //私钥
                    var jjjsjtj = SM.decrypt(value,
                        "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b");
                    var list = JSON.parse(jjjsjtj)
                    console.log(list);
                    console.log("--------------------------");
                    that.kaida = list.result.id
                    that.columnsa = list.result
                })

            },
            // 业务员提交
            ywytj() {
                var that = this
                // var zzzz = sessionStorage.getItem("zzzz")
                // console.log("zzzz", zzzz);
                // var sfza = sessionStorage.getItem("sfza")
                // console.log("sfza", sfza);
                // var sfzb = sessionStorage.getItem("sfzb")
                // console.log("sfzb", sfzb);
                // var sqs = sessionStorage.getItem("sqs")
                // console.log("sqs", sqs);
                if (that.zzzz == "" || that.zzzz == null) {
                    that.$toast("请上传组织证照")
                    return
                }
                if (that.value == "") {
                    that.$toast("申报口岸不能为空")
                    return
                }
                if (that.valuea == "") {
                    that.$toast("企业类型不能为空")
                    return
                }
                if (that.qymc == "") {
                    that.$toast("企业名称不能为空")
                    return
                }
                if (that.jgdm == "") {
                    that.$toast("机构代码不能为空")
                    return
                }
                if (that.sfza == "" || that.sfza == null) {
                    that.$toast("请上传身份证（正面）")
                    return
                }
                if (that.sfzb == "" || that.sfzb == null) {
                    that.$toast("请上传身份证（反面）")
                    return
                }
                if (that.ssbm == "") {
                    that.$toast("所属部门不能为空")
                    return
                }
                if (that.zw == "") {
                    that.$toast("职务不能为空")
                    return
                }
                if (that.sqs == "" || that.sqs == null) {
                    that.show = true
                } else {
                    that.$toast.loading({
                        message: '上传中...',
                        forbidClick: true,
                        duration: 50000,
                    });
                    var jmqsjtj = JSON.stringify({
                        //入参内容
                        "bm": "",
                        "code": that.jgdm,
                        "createBy": "",
                        "createTime": "",
                        "id": "",
                        "lxdh": that.dh,
                        "name": "",
                        "phone": "",
                        "pid": "",
                        "qymc": that.qymc,
                        "sbka": that.kaid,
                        "busType": that.kaida,
                        "sfz": that.sfz,
                        "sfza": that.sfza,
                        "sfzb": that.sfzb,
                        "sh": "",
                        "shxx": "",
                        "sqs": that.sqs,
                        "sysOrgCode": that.ssbm,
                        "updateBy": "",
                        "updateTime": "",
                        "xb": that.radio,
                        "xm": that.xm,
                        "zw": that.zw,
                        "zzzz": that.zzzz,
                    })
                    var jmhsjtj = SM.encrypt(jmqsjtj,
                        //公钥
                        "048b7acbb9884686aa9317a6ca3059f6c2eb4e2686c6eb1e70d598f48af8748075f1aef521cf837d67a95281d4667ade8228fb577eb4256e15a9e807323b2b5efc"
                    );
                    // var appid = that.appid;
                    var appid = "Embmzckm";
                    var interfaceid = 'qyywysq';
                    var interfacecontent = jmhsjtj
                    var fromport = '2';
                    var signurl = 'https://' + urldomaincreatesign;
                    var gatewayurl = 'https://' + urldomaingateway;
                    vaildInterfacefn(appid, interfaceid, interfacecontent, fromport, signurl, gatewayurl).then(
                        value => {
                            console.log(jmqsjtj);
                            console.log(value);
                            //私钥
                            var jjjsjtj = SM.decrypt(value,
                                "6636756e69f8276c514919d04eaf928498b443bfb783e8fe6fa6977056c4d90b");
                            var list = JSON.parse(jjjsjtj)
                            console.log(list);
                            if (list.code == 200) {
                                that.$toast('提交成功');
                                that.$router.push('./')
                                that.$toast.clear();
                            } else {
                                that.$toast("上传失败，请重新上传");
                            }
                            
                            if (list.code == 500) {
                                that.$toast.clear();
                                that.$toast(list.message);
                            }
                        })
                }
            }
        }
    }
</script>


<style scoped lang="less">
    // .van-button--normal {
    //     padding: 25px 15px 0 15px;
    // }

    // .van-button__icon {
    //     margin-top: -22px;
    // }

    .biaodanm {
        padding-bottom: 15px;
    }

    .van-divider::before {
        display: none;
    }

    .anniu {
        padding: 35px 10px 35px 10px;
    }

    .van-cell[data-v-2a6871e3] {
        padding: 16px 16px;
    }

    .box {
        background-color: #e0e0e023;
    }

    .tsxx {
        width: 90%;
        font-size: 12px;
        font-variant-caps: all-small-caps;
        color: #f3d87d;
    }

    .el-divider--vertical {
        height: 6em;
        top: 15%;
    }

    .van-cell {
        padding: 12px 16px;
    }

    .row {
        height: 140px;
        // line-height: 140px;
        background-color: #F4F9FF;
        margin: 0px 10px 40px 10px;

        .mingz {
            height: 40px;
            width: 90%;
            font-weight: 500;
            font-size: 20px;
            display: flex;
            align-items: center;
            margin-left: auto;
            // line-height: 30px;
        }

        .shangc {
            height: 100px;
            line-height: 100px;
        }

        .van-col {
            height: 140px;
            // line-height: 140px;
            text-align: center;

            .avatar-uploader {
                height: 100px !important;
                line-height: 94px;
            }
        }
    }

    .avatar-uploader .el-upload {
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }

    .van-cell {
        font-size: 18px;
    }


    .avatar-uploader-icon {
        // font-size: 28px;
        background-color: #ffffff;
        color: #8c939d;
        width: 105px;
        height: 80px;
        line-height: 80px;
        text-align: center;
    }

    .colee {
        // display: flex;
        // justify-content: center;
        // align-items: center;
        position: relative;

        .avatar {
            width: 60px;
            height: 40px;
            display: block;
            // margin: 0 auto;
            position: absolute;
            top: 55%;
            left: 50%;
            transform: translate(-50%, -50%);
        }

        .aher {
            width: 60px;
            height: 40px;
            display: block;
            color: #008cff;
            font-size: 14px;
            // margin: 0 auto;
            position: absolute;
            top: 85%;
            left: 50%;
            transform: translate(-50%, -50%);
        }
    }
</style>